<template>
  <div>
    <h1>章节</h1>
    <table>
      <tr>
        <td>名称</td>
        <td>分类</td>
        <td>视频</td>
      </tr>
      <tr v-for="i in jie">
        <td>{{ i.name }}</td>
        <td>{{ i.ctitle }}</td>
        <td>
          <video :src="'http://localhost:5000/'+i.video_url" width="200px" autoplay></video>
        </td>
      </tr>
    </table>

  </div>
</template>

<script>
export default {
  name: "show_jie",
  data() {
    return {
      id: this.$route.query.id,
      jie: []
    }
  },
  methods: {
    getjie() {
      this.$axios.get('/courses/jie?id=' + this.id).then(res => {
        if (res.data.code == 200) {
          this.jie = res.data.list
        }
      })

    }
  },
  mounted() {
    this.getjie()
  }
}
</script>

<style scoped>

</style>
